#include <iostream>
#include "DivObserver.h"

using std::cout;

DivObserver::DivObserver(Subject* model, int val)
{
    model->attach(this);
    m_nDiv = val;
}

void DivObserver::update(int val)
{
    cout << val << " div " << m_nDiv << " is " << val / m_nDiv << '\n';
}
